{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "a7839f6e-c640-49f9-b937-b00b9ccb51db",
   "metadata": {},
   "outputs": [],
   "source": [
    "from datasets import load_dataset, get_dataset_split_names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ce6047db-d431-4e2b-bd07-b674f5f94040",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['train', 'validation', 'test']\n"
     ]
    }
   ],
   "source": [
    "dataset = load_dataset(\"rotten_tomatoes\")\n",
    "print(get_dataset_split_names(\"rotten_tomatoes\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "568c8719-6c24-454e-930c-ae21ff13d6ee",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "{'text': Value(dtype='string', id=None), 'label': ClassLabel(names=['neg', 'pos'], id=None)}\n"
     ]
    }
   ],
   "source": [
    "training_data = dataset['train']\n",
    "print(training_data.description)\n",
    "print(training_data.features)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e4ad99de-d57a-46a5-ae43-8bfa96c58b98",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "the rock is destined to be the 21st century's new \" conan \" and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal .\n",
      "\n",
      "the gorgeously elaborate continuation of \" the lord of the rings \" trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth .\n",
      "\n",
      "effective but too-tepid biopic\n",
      "\n",
      "if you sometimes like to go to the movies to have fun , wasabi is a good place to start .\n",
      "\n",
      "emerges as something rare , an issue movie that's so honest and keenly observed that it doesn't feel like one .\n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[None, None, None, None, None]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sentences = training_data['text'][:5]\n",
    "[print(f\"{sentence}\\n\") for sentence in sentences]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "729b2d99-a8cc-4984-9d18-32c8c2e101b8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
